package com.hncgy.xzf.jdapi.controller.index;

import com.hncgy.xzf.jdapi.domain.product.vo.SeckillPromotionVO;
import com.hncgy.xzf.jdapi.mapper.product.PromotionProductsMapper;
import com.hncgy.xzf.jdapi.service.product.Impl.PromotionProductsServiceImpl;
import com.hncgy.xzf.jdapi.tool.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/index/seckill")
public class SeckillController {

    @Autowired
    private PromotionProductsServiceImpl promotionProductsService;

    @RequestMapping("/list")
    public Result<List<SeckillPromotionVO>> list() {
        List<SeckillPromotionVO> data = promotionProductsService.selectTodaySeckillPromotions();
        return Result.success(data);
    }

}
